
<script>

</script>
                <div id="content" class="span10">
				
                    <!-- content starts -->
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <?php if(!empty($detail)){
                                    foreach ($detail as $row){
                                    ?>
                                <form class="form-horizontal" action="<?php echo base_url();?>setoran/update" method="post">
                                  <fieldset>
                                    <legend>Ubah Detail Setoran</legend>
									
                                    <div class="row-fluid">
									
									
                                        <div class="span6">
                                            <div class="control-group">
											
                                                <label class="control-label" for="typeahead">Nomer Bukti</label>
                                                <div class="controls">
												
                                                    <input type="hidden" class="span6 typeahead" id="typeahead" name="id_barang" id="id_barang" value="<?=$row['nomer_bukti']?>">
                                                    <input type="text" class="span8 typeahead" name="id_barang" id="id_barang" value="<?=$row['nomer_bukti']?>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Tanggal</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nama" id="nama" value="<?=$row['tanggal']?>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Keterangan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="keterangan" id="keterangan" value="<?=$row['keterangan']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="harga_tunai" id="harga_tunai" value="<?=$row['karyawan']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Nominal</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="harga_tunai" id="harga_tunai" value="<?=$row['nominal']?>">
                                                </div>
                                            </div>
                                        </div>
                             
                                        
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <a type="reset" class="btn" href="<?php echo base_url() ?>bar">Cancel</a>
                                    </div>
                                    </fieldset>
                                </form>
								
                                <?php }}else {?>
                                
								<form class="form-horizontal" action="<?php echo base_url();?>setoran/insert" method="post">
                                  <fieldset>
                                    <legend>Setoran Baru</legend>
                                    <?php if(empty($error)){}else{?>
                                    <div class="alert alert-warning alert-dismissible" role="alert">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only"></span></button>
                                        <strong>Peringatan!</strong> Nama Barang sudah ada
                                    </div>
                                    <?php } ?>
                                    <div class="row-fluid">
                                        <div class="span6">
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nomer Bukti</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nomer_bukti" id="id_barang" >
                                                </div>
                                            </div>
                                            <div class="control-group">
											
                                                <label class="control-label" for="typeahead">Tanggal</label>
                                                <div class="controls">
                                                    <input type="date" class="span8 typeahead" name="tanggal" id="nama" >
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Keterangan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="keterangan" id="keterangan" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="harga_tunai" id="harga_tunai" >
                                                </div>
                                            </div>
											
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Nominal</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nominal" id="harga_tunai" >
                                                </div>
                                            </div>
											
                                        </div>
                                     
                                    </div>
                                    
									
									<div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <button type="reset" class="btn">Cancel</button>
                                    </div>
                                    </fieldset>
                                </form>
								
                                <?php } ?>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
					
                    <?php
                    if (empty($setor)){
                        echo "tidak ada data";
                    } 
                    else {
                    
                    ?>
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <table class="table table-striped table-bordered bootstrap-datatable datatable">
                                    <thead>
                                        <tr>
                                            <th>Nomer Bukti</th>
                                            <th>Tanggal</th>
                                            <th>Keterangan</th>
                                            <th>Karyawan</th>
                                            <th>Nominal</th>
                                           
                                           
                                        </tr>
                                    </thead>
                                    
                                    <tbody>
                                        <?php
                                    foreach ($setor as $row) {
                                    ?>
                                        <tr>
                                            <td><?=$row['nomer_bukti']?></td>
                                            <td><?=$row['tanggal']?></td>
                                            <td><?=$row['keterangan']?></td>
                                            <td><?=$row['karyawan']?></td>
                                            <td><?=$row['nominal']?></td>
				
                                            <td class="center">
                                                <a class="btn btn-info" href="<?php echo base_url()?>setoran/edit/<?=$row['id_setoran']?>">
                                                    <i class="icon-edit icon-white"></i>  
                                                    Edit                                            
                                                </a>
                                                
                                            </td>
                                        </tr>
                                        <?php
                                        } 
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
                    <?php 
                }
                    ?>
                    <!--/row-->
                    <!-- content ends -->
                </div>
                <!--/#content.span10-->